home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / bsd / net / netisr.h < prev    next >
C/C++ Source or Header  |  1995-02-14  |  2KB  |  68 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1987 Carnegie-Mellon University
  4.  * All rights reserved.  The CMU software License Agreement specifies
  5.  * the terms and conditions for use and redistribution.
  6.  */
  7. /* 
  8.  **********************************************************************
  9.  * HISTORY
  10.  *  5-Nov-87  David Golub (dbg) at Carnegie-Mellon University
  11.  *    Use kernel-thread for networking code.
  12.  *
  13.  **********************************************************************
  14.  */ 
  15.  
  16. /*
  17.  * Copyright (c) 1980, 1986 Regents of the University of California.
  18.  * All rights reserved.  The Berkeley software License Agreement
  19.  * specifies the terms and conditions for redistribution.
  20.  *
  21.  *    @(#)netisr.h    7.1 (Berkeley) 6/4/86
  22.  */
  23.  
  24. #ifdef    MACH
  25. /*
  26.  *    The networking code is a separate kernel task, currently
  27.  *    bound to the master cpu.
  28.  */
  29. #if    defined(KERNEL) && !defined(LOCORE)
  30.  
  31. int    soft_net_wakeup;
  32. #define    setsoftnet()    (wakeup((caddr_t)&soft_net_wakeup))
  33.  
  34. #endif    defined(KERNEL) && !defined(LOCORE)
  35.  
  36. #else    MACH
  37. /*
  38.  * The networking code runs off software interrupts.
  39.  *
  40.  * You can switch into the network by doing splnet() and return by splx().
  41.  * The software interrupt level for the network is higher than the software
  42.  * level for the clock (so you can enter the network in routines called
  43.  * at timeout time).
  44.  */
  45. #ifdef vax
  46. #define    setsoftnet()    mtpr(SIRR, 12)
  47. #endif
  48. #endif    MACH
  49.  
  50. /*
  51.  * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
  52.  * word which is used to de-multiplex a single software
  53.  * interrupt used for scheduling the network code to calls
  54.  * on the lowest level routine of each protocol.
  55.  */
  56. #define    NETISR_RAW    0        /* same as AF_UNSPEC */
  57. #define    NETISR_IP    2        /* same as AF_INET */
  58. #define    NETISR_IMP    3        /* same as AF_IMPLINK */
  59. #define    NETISR_NS    6        /* same as AF_NS */
  60.  
  61. #define    schednetisr(anisr)    { netisr |= 1<<(anisr); setsoftnet(); }
  62.  
  63. #ifndef LOCORE
  64. #ifdef KERNEL
  65. int    netisr;                /* scheduling bits for network */
  66. #endif
  67. #endif
  68.